package edu.hwadee.entity;

/**
 * FitmaterialId entity. @author MyEclipse Persistence Tools
 */

public class FitmaterialId implements java.io.Serializable {

	// Fields

	private Integer materialId;
	private Integer carComplementId;

	// Constructors

	/** default constructor */
	public FitmaterialId() {
	}

	/** full constructor */
	public FitmaterialId(Integer materialId, Integer carComplementId) {
		this.materialId = materialId;
		this.carComplementId = carComplementId;
	}

	// Property accessors

	public Integer getMaterialId() {
		return this.materialId;
	}

	public void setMaterialId(Integer materialId) {
		this.materialId = materialId;
	}

	public Integer getCarComplementId() {
		return this.carComplementId;
	}

	public void setCarComplementId(Integer carComplementId) {
		this.carComplementId = carComplementId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof FitmaterialId))
			return false;
		FitmaterialId castOther = (FitmaterialId) other;

		return ((this.getMaterialId() == castOther.getMaterialId()) || (this.getMaterialId() != null
				&& castOther.getMaterialId() != null && this.getMaterialId().equals(castOther.getMaterialId())))
				&& ((this.getCarComplementId() == castOther.getCarComplementId())
						|| (this.getCarComplementId() != null && castOther.getCarComplementId() != null
								&& this.getCarComplementId().equals(castOther.getCarComplementId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getMaterialId() == null ? 0 : this.getMaterialId().hashCode());
		result = 37 * result + (getCarComplementId() == null ? 0 : this.getCarComplementId().hashCode());
		return result;
	}

}